package com.ftg.learn.chapter08.pattern.factory;

/**
 * 猫工厂
 *
 * @author lijiaxin
 * @version 1.0
 * @date 2023/8/3 9:53
 */

public class CatFactory {

    /**
     * 帮你创建 实例
     * @return
     */

    public static Cat instanceCat(String type){
        Cat c=new Cat();
        c.setType(type);
        return c;
    }
    public static Cat instanceCatName(String name){
        Cat c=new Cat();
        c.setName(name);
        return c;
    }
    public static Cat instanceCat(String type,String name){
        Cat c=new Cat();
        c.setType(type);
        c.setName(name);
        return c;
    }
}
